<template>
  <div class="list">
    <div class="list_top">
      <li @click="back()">
        <van-icon name="arrow-left" />
      </li>
      <li>排行榜</li>
      <li>
        <van-icon name="ellipsis" />&ensp;
        <van-icon name="more-o" />
      </li>
    </div>
    <div class="list_menu">
      <div class="search">
        <van-icon name="search" />
        <input type="text" placeholder="请输入需要查询的经纪人" v-model="value" @input="search(value)" />
      </div>
    </div>
    <div class="list_midd">
      <li class="olist" v-for="(item,idx) in list" :key="idx">
        <img :src="item.imgs" alt @click="godetail(item.id)" />
        <p>{{item.id}}</p>
        <p>{{item.name}}</p>
        <!-- <p><van-icon name="comment-circle" /></p>
        <p><van-icon name="phone-circle" /></p>-->
      </li>
      <!-- <div class="list_middle"> -->
      <!-- <dl>
            <dt>
              <img :src="item.img" alt />
            </dt>
            <dd>{{item.id}}&emsp;{{item.name}}</dd>
      </dl>-->
      <!-- </div> -->
    </div>
  </div>
</template>

<script>
import axios from "../../utils/request";
export default {
  data() {
    return {
      list: [],
      value: ""
    };
  },
  created() {
    this.getList();
  },
  methods: {
    getList() {
      axios({
        url: "/api/lists",
        method: "post"
      }).then(res => {
        this.list = res.data.data;
      });
    },
    back() {
      this.$router.go(-1);
    },
    godetail(id) {
      this.$router.push(`/broker/` + id);
    },
    search(value) {
      axios({
        url: "/api/search",
        method: "post",
        data: {
          value: value
        }
      }).then(res => {
        this.list = res.data.data;
      });
    }
  }
};
</script>

<style>
.list {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.list_top {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #1180f4;
  color: #fff;
  font-size: 20px;
}
.list_top li:nth-child(3) {
  width: 80px;
  height: 30px;
  border: 1px solid #fff;
  border-radius: 20px;
  text-align: center;
  line-height: 30px;
  margin-left: 40px;
}
.list_top li:nth-child(2) {
  margin-left: 50px;
}
.list_menu {
  width: 100%;
  height: 250px;
  background: linear-gradient(45deg, #f74343, #f56c6c, #fbc4c4);
  position: relative;
}
.search {
  width: 95%;
  height: 35px;
  margin-left: 10px;
  background: rgba(247, 247, 247, 0.6);
  border-radius: 5px;
  margin-top: 5px;
  color: #fff;
}
.search .van-icon {
  font-size: 20px;
  line-height: 34px;
  color: #fff;
  padding-left: 10px;
}
.search input {
  font-size: 16px;
  width: 200px;
  border: none;
  outline: none;
  background: rgba(247, 247, 247, 0);
  padding-left: 10px;
}
.list_midd {
  display: flex;
  flex-wrap: wrap;
  position: absolute;
  top: 200px;
  left: 0;
}
.list_midd li {
  width: 135px;
  height: 180px;
  background: #fff;
  border-radius: 10px;
  text-align: center;
  margin-left: 2px;
  border: 1px solid rgb(240, 240, 240);
  line-height: 20px;
}
.list_midd li:nth-child(3) {
  position: absolute;
  top: 40px;
  left: 275px;
  /* background: hotpink; */
}
.list_midd li:nth-child(1) {
  position: absolute;
  top: 0px;
  left: 137px;
  /* background: hotpink; */
}
.list_midd li:nth-child(2) {
  position: absolute;
  top: 40px;
  left: 0px;
  /* background: hotpink; */
}
.list_midd li:nth-child(4) {
  width: 400px;
  height: 90px;
  margin-top: 230px;
  display: flex;
  margin-left: 7px;
  /* background: hotpink; */
}
.list_midd li:nth-child(4) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(5) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(6) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(7) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(8) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(9) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(10) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(11) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(12) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(13) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(14) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(15) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(16) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(17) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(18) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(19) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(20) img {
  width: 70px;
  height: 70px;
  margin-left: 10px;
}
.list_midd li:nth-child(4) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(5) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(6) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(7) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(8) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(9) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(10) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(11) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(12) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(13) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(14) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(15) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(16) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(17) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(18) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(19) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(20) p {
  padding-top: 20px;
  padding-left: 10px;
}
.list_midd li:nth-child(5) {
  width: 400px;
  height: 90px;
  display: flex;
  margin-left: 7px;
  margin-top: 10px;
  /* background: hotpink; */
}
.list_midd li:nth-child(6) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(7) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(8) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(9) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(10) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(11) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(12) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(13) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(14) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(15) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(16) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(17) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(18) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(19) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li:nth-child(20) {
  width: 400px;
  height: 90px;
  display: flex;
  /* background: hotpink; */
}
.list_midd li p:nth-of-type(1) {
  font-size: 20px;
  font-weight: bold;
  color: rgb(255, 81, 0);
}
.list_midd li p:nth-of-type(2) {
  font-size: 18px;
  font-weight: bold;
  color: #000;
}
.list_midd li img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-top: 10px;
}
/* .list_middle {
  flex: 1;
  overflow-y: auto;
} */
</style>